package com.netease.a.b;

import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.http.util.EncodingUtils;

public class b extends d
{
  public static final String q = "application/octet-stream";
  public static final String r = "ISO-8859-1";
  public static final String s = "binary";
  protected static final String t = "; filename=";
  private static final byte[] u = EncodingUtils.getAsciiBytes("; filename=");
  private f v;

  public b(String paramString, f paramf)
  {
    this(paramString, paramf, null, null);
  }

  public b(String paramString1, f paramf, String paramString2, String paramString3)
  {
    super(paramString1, paramString2, paramString3, "binary");
    if (paramf == null)
      throw new IllegalArgumentException("Source may not be null");
    this.v = paramf;
  }

  public b(String paramString, File paramFile)
  {
    this(paramString, new e(paramFile), null, null);
  }

  public b(String paramString1, File paramFile, String paramString2, String paramString3)
  {
    this(paramString1, new e(paramFile), paramString2, paramString3);
  }

  public b(String paramString1, String paramString2, File paramFile)
  {
    this(paramString1, new e(paramString2, paramFile), null, null);
  }

  public b(String paramString1, String paramString2, File paramFile, String paramString3, String paramString4)
  {
    this(paramString1, new e(paramString2, paramFile), paramString3, paramString4);
  }

  protected void b(OutputStream paramOutputStream)
  {
    super.b(paramOutputStream);
    String str = this.v.b();
    if (str != null)
    {
      paramOutputStream.write(u);
      paramOutputStream.write(f);
      paramOutputStream.write(EncodingUtils.getAsciiBytes(str));
      paramOutputStream.write(f);
    }
  }

  protected void f(OutputStream paramOutputStream)
  {
    if (h() == 0L);
    while (true)
    {
      return;
      byte[] arrayOfByte = new byte[4096];
      InputStream localInputStream = this.v.c();
      try
      {
        int i = localInputStream.read(arrayOfByte);
        if (i >= 0)
          paramOutputStream.write(arrayOfByte, 0, i);
      }
      finally
      {
        localInputStream.close();
      }
    }
  }

  protected long h()
  {
    return this.v.a();
  }

  protected f j()
  {
    return this.v;
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.a.b.b
 * JD-Core Version:    0.6.0
 */